package com.takanafu.haru.code{
	import com.takanafu.haru.Thread;
	
	import mx.collections.ArrayCollection;
	
	public class CodeBase{
		public var thread:Thread = null;
		
		public function CodeBase(){
			super();
		}

		public function run():CodeBase{
			return this;
		}
		public function add(code:CodeBase):CodeBase{
			throw new Error("Can't use '+' operation.");
		}
		public function sub(code:CodeBase):CodeBase{
			throw new Error("Can't use '-' operation.");
		}
		public function mul(code:CodeBase):CodeBase{
			throw new Error("Can't use '*' operation.");
		}
		public function dev(code:CodeBase):CodeBase{
			throw new Error("Can't use '/' operation.");
		}
		public function les(code:CodeBase):CodeBase{
			throw new Error("Can't use '<' operation.");
		}
		public function gre(code:CodeBase):CodeBase{
			throw new Error("Can't use '>' operation.");
		}
		public function le(code:CodeBase):CodeBase{
			throw new Error("Can't use '<=' operation.");
		}
		public function ge(code:CodeBase):CodeBase{
			throw new Error("Can't use '>=' operation.");
		}
		public function and(code:CodeBase):CodeBase{
			throw new Error("Can't use '&&' operation.");
		}
		public function or(code:CodeBase):CodeBase{
			throw new Error("Can't use '||' operation.");
		}
		public function message(symbol:CodeSymbol):CodeBase{
			throw new Error("Can't find message. message is '" + symbol.toString() + "'.");
		}
		public function method(symbol:CodeSymbol,list:ArrayCollection):CodeBase{
			throw new Error("Can't find method. name is '" + symbol.toString() + "'.");
		}
		public function assign(symbol:CodeSymbol,code:CodeBase):void{
			throw new Error("Can't find field. name is '" + symbol.toString() + "'.");
		}
		public function toString():String{
			return null;
		}
	}
}